package com.fenrirtec.aepp.portal.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.fenrirtec.aepp.portal.common.action.CommonAction;

public class NewsNoticeAction extends CommonAction {

	private static final long serialVersionUID = 1L;

	private static final Logger logger = LoggerFactory.getLogger(NewsNoticeAction.class);
	private Integer category;
	
	public Integer getCategory() {
		return category;
	}

	public void setCategory(Integer category) {
		this.category = category;
	}

	public String init() {
		if (logger.isInfoEnabled()) {
			logger.info("[NewsNoticeAction#init] start.");
		}
		
		HttpServletRequest reqeust= ServletActionContext.getRequest();
		String strCategory = reqeust.getParameter("category");		
		if (strCategory != null){
			category = Integer.valueOf(strCategory);			
		}else{
			category = 0;
		}
		
		if (logger.isInfoEnabled()) {
			logger.info("[NewsNoticeAction#init] finish.");
		}
		return SUCCESS;
	}
}
